import request from '@/utils/request'

// 查询答案项列表
export function listAnswer(query) {
  return request({
    url: '/dt/answer/list',
    method: 'get',
    params: query
  })
}

// 查询答案项详细
export function getAnswer(id) {
  return request({
    url: '/dt/answer/' + id,
    method: 'get'
  })
}

// 新增答案项
export function addAnswer(data) {
  return request({
    url: '/dt/answer',
    method: 'post',
    data: data
  })
}

// 修改答案项
export function updateAnswer(data) {
  return request({
    url: '/dt/answer',
    method: 'put',
    data: data
  })
}

// 删除答案项
export function delAnswer(id) {
  return request({
    url: '/dt/answer/' + id,
    method: 'delete'
  })
}

// 导出答案项
export function exportAnswer(query) {
  return request({
    url: '/dt/answer/export',
    method: 'get',
    params: query
  })
}